<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改节目信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${programInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">对象类型：</label>
                <div class="col-sm-8">
                    <input name="elementtype"  th:field="*{elementtype}"  class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">操作类型：</label>
                <div class="col-sm-8">
                    <input name="action" th:field="*{action}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">code：</label>
                <div class="col-sm-8">
                    <input name="code" th:field="*{code}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">父对象标识：</label>
                <div class="col-sm-8">
                    <input name="pcode" th:field="*{pcode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">节目名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">分集数：</label>
                <div class="col-sm-8">
                    <input name="volumncount" th:field="*{volumncount}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">期数：</label>
                <div class="col-sm-8">
                    <input name="period" th:field="*{period}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">副标题名称：</label>
                <div class="col-sm-8">
                    <input name="vname" th:field="*{vname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">主海报：</label>
                <div class="col-sm-8">
                    <input name="posterurl1" th:field="*{posterurl1}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">副海报：</label>
                <div class="col-sm-8">
                    <input name="posterurl2" th:field="*{posterurl2}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">上线状态标志：</label>
                <div class="col-sm-9">
                    <select class="form-control" th:field="*{status}" name="status">
                        <option value="0">上线</option>
                        <option value="1">下线</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">是否计费(0免费，1付费)：</label>
                <div class="col-sm-9">
                    <select class="form-control" th:field="*{bcharging}" name="bcharging">
                        <option value="0">免费</option>
                        <option value="1">付费</option>

                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">是否预告片：</label>
                <div class="col-sm-9">
                    <select class="form-control" th:field="*{bpreview}" name="bpreview">
                        <option value="0">正片</option>
                        <option value="1">预告片</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "tvProgram";
        $("#form-info-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
            }
        }
    </script>
</body>
</html>
